package com.example.authority.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Data;

import lombok.experimental.Accessors;


/**
 * @program: authority-hm-0.0.1
 * @ClassName:Cart
 * @description: 购物车列表 实体类
 * @author:dyy
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_cart")
@Schema(title = "Cart对象", description = "购物车列表")
public class Cart implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;

    @Schema(title = "创建账户")
    @TableField("name")
    @ExcelProperty("创建账户")
    private String name;

    @Schema(title = "商品编号")
    @TableField("gid")
    @ExcelProperty("商品编号")
    private Long gid;
    @Schema(title = "商品实体")
    @TableField(exist = false)
    @ExcelIgnore
    private Goods goods = new Goods();

    @Schema(title = "创建时间")
    @TableField("time")
    @ExcelProperty("创建时间")
    private String time;
    @Schema(title = "数量")
    @TableField("scount")
    @ExcelProperty("数量")
    private Integer scount;

}
